OTInitInetAddress
Fills in anInetAddress
structure with the data you provide.C INTERFACE
void OTInitInetAddress (InetAddress *addr, InetPort port, InetHost host);C++ INTERFACE
None. C++ clients use the C interface to this function.PARAMETERS
addr
- A pointer to an
InetAddress
structure that you allocate. The function fills in this structure.port
- The port number of the address.
host
- The IP address of the host in network byte order (that is, high-order byte first) in hexadecimal format. This must be a fully qualified address.
DESCRIPTION
This function fills in thefAddressType
field of theInetAddress
structure with the valueAF_INET
. You use theInetAddress
structure when providing a TCP or UDP address to the Open Transport functionsOTConnect
,OTSndURequest
, andOTBind
. You are not required to use theOTInitInetAddress
function when creating anInetAddress
structure; this function is provided for your convenience only.SEE ALSO
TheInetAddress
structure is described in "Internet Address Structure" on page 8-22.You can use the
OTInetStringToHost
function (page 8-54) to put the address inInetHost
format.